<?php
/**
 * SocialEnginePro
 *
 * @category   Application_Extensions
 * @package    tv
 * @author     Azim
 */

/**
 * @category   Application_Extensions
 * @package    tv
 */
?>
<h2>
  <?php echo $this->translate('TV plugin') ?>
</h2>

<?php if( count($this->navigation) ): ?>
  <div class='tabs'>
    <?php
      // Render the menu
      //->setUlClass()
      echo $this->navigation()->menu()->setContainer($this->navigation)->render()
    ?>
  </div>
<?php endif; ?>

<?php echo $this->form->render(); ?>
</br>
<?php if( count($this->paginator) ): ?>
<div class="site_tv" style="float: left;">
  <table class='admin_table'>
    <thead>
      <tr>
        <th><?php echo $this->translate('ID')?></th>  
        <th><?php echo $this->translate('Title')?></th>   
        <th><?php echo $this->translate('View')?></th>   
        <th><?php echo $this->translate('Creation Date')?></th>   
        <th><?php echo $this->translate('Show')?></th>   
      </tr>
    </thead>
    <tbody>
        <?php foreach ($this->paginator as $item): ?>
          <tr>
            <td><?php echo $item->tv_id?></td>  
            <td><?php echo $item->title?></td>
            <td><?php echo $item->view_count?></td>
            <td><?php echo $this->timestamp($item->view_count)?></td>
            <td><?php echo $this->htmlLink($item->getHref(), $this->translate('show'))?></td>
          </tr>
        <?php endforeach; ?>
    </tbody>
  </table>
</div>
<div>
  <?php echo $this->paginationControl($this->paginator); ?>
</div>

<?php else: ?>
  <div class="tip">
    <span>
      <?php echo $this->translate("There are no TV  posted by your members yet.") ?>
    </span>
  </div>
<?php endif; ?>